package com.example.managemyself.data.model;

import androidx.room.Entity;
import androidx.room.PrimaryKey;
import androidx.room.TypeConverters;

import com.example.managemyself.util.DateConverter;

import java.util.Date;

@Entity(tableName = "health_logs")
public class HealthLog {
    @PrimaryKey(autoGenerate = true)
    private int id;
    
    private Date date;
    private int sleepHours;      // 睡眠时长（小时）
    private int waterIntake;     // 饮水量（毫升）
    private String mealRecord;   // 饮食记录
    private int stepCount;       // 步数
    private String healthNotes;  // 健康笔记
    private double weight;       // 体重（千克）
    private boolean hasMedicine; // 是否服药
    private String medicineNotes; // 药物记录
    
    // 构造函数
    public HealthLog(Date date) {
        this.date = date;
    }
    
    // Getters and Setters
    public int getId() {
        return id;
    }
    
    public void setId(int id) {
        this.id = id;
    }
    
    public Date getDate() {
        return date;
    }
    
    public void setDate(Date date) {
        this.date = date;
    }
    
    public int getSleepHours() {
        return sleepHours;
    }
    
    public void setSleepHours(int sleepHours) {
        this.sleepHours = sleepHours;
    }
    
    public int getWaterIntake() {
        return waterIntake;
    }
    
    public void setWaterIntake(int waterIntake) {
        this.waterIntake = waterIntake;
    }
    
    public String getMealRecord() {
        return mealRecord;
    }
    
    public void setMealRecord(String mealRecord) {
        this.mealRecord = mealRecord;
    }
    
    public int getStepCount() {
        return stepCount;
    }
    
    public void setStepCount(int stepCount) {
        this.stepCount = stepCount;
    }
    
    public String getHealthNotes() {
        return healthNotes;
    }
    
    public void setHealthNotes(String healthNotes) {
        this.healthNotes = healthNotes;
    }
    
    public double getWeight() {
        return weight;
    }
    
    public void setWeight(double weight) {
        this.weight = weight;
    }
    
    public boolean isHasMedicine() {
        return hasMedicine;
    }
    
    public void setHasMedicine(boolean hasMedicine) {
        this.hasMedicine = hasMedicine;
    }
    
    public String getMedicineNotes() {
        return medicineNotes;
    }
    
    public void setMedicineNotes(String medicineNotes) {
        this.medicineNotes = medicineNotes;
    }
}
